java.lang.Object
edu.claflin.finder.algo.clustering.struct.infomap_struct.AvgBitLength

public class AvgBitLength extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • setGraph

      public void setGraph(Graph graph)
    • setModules

      public void setModules(Map<Integer,List<Node>> modules)
    • randomWalker

      private static ArrayList<Node> randomWalker(Graph g)
      Generates a path taken by random walker. Will be used to calculate average bit length
    • testRandomWalker

      private static ArrayList<Node> testRandomWalker(Graph g)
    • avgBitLength

      public double avgBitLength()
      Calculates average bit length for random path of this graph
      Returns:
    • totalModuleCode

      private double totalModuleCode(Map<Integer,List<Node>> modules, Map<Integer,Integer> moduleFrequency)
    • totalModuleFreq

      private double totalModuleFreq(Map<Integer,Integer> moduleFrequency)
    • totalExitCodes

      private double totalExitCodes(Map<Integer,Integer> moduleFrequency)
    • totalNodeFreq

      private double totalNodeFreq(List<Node> nodes)
    • totalModuleNodeFreq

      private double totalModuleNodeFreq(List<Node> moduleNodes)